import request from '@/plugin/axios'


// 获取列表
export function getusergrouplist(params) {
    return request({
        url: '/upms/usergroup/list',
        method: 'get',
        params: request.adornParams(params)
    })
}

// 获取树列表
export function getusergrouptree(params) {
    return request({
        url: '/upms/usergroup/tree',
        method: 'get',
        params: request.adornParams(params)
    })
}

// 获取树列表
export function getUserGroupTree(pkGroup) {
    return request({
        url: '/upms/usergroup/getUserGroupTree/' + pkGroup,
        method: 'get',
        params: request.adornParams({})
    })
}
// 获取信息
export function getusergroupinfo(id) {
    return request({
        url: '/upms/usergroup/info/' + id,
        method: 'get',
        params: request.adornParams({})
    })
}

// 添加
export function addusergroup(data) {
    return request({
        url: '/upms/usergroup/save',
        method: 'post',
        data
    })
}

// 修改
export function updateusergroup(data) {
    return request({
        url: '/upms/usergroup/update',
        method: 'put',
        data
    })
}

// 批量删除
export function delBatchusergroup(params) {
    return request({
        url: '/upms/usergroup/delete',
        method: 'post',
        data: request.adornData(params, false)
    })
}

// 删除
export function delusergroup(id) {
    return request({
        url: '/upms/usergroup/delete/' + id,
        method: 'delete',
    })
}


// 数据导入
export function usergroupImport(data) {
    return request({
        url: '/report/usergroup/import',
        method: 'post',
        data: data
    })
}
// 数据导出
export function usergroupExport(params) {
    return request({
        url: '/report/usergroup/export',
        method: 'get',
        params: request.adornParams(params)
    })
}